package com.inspur.security.cbb3.kms.keymanager.containersecret.po;

import java.io.Serializable;
import javax.persistence.*;
import org.hibernate.annotations.GenericGenerator;
import lombok.Data;

/**
 * @Description  容器-密钥关联关系表
 * @author  lijunchang
 */

@Entity
@Table ( name ="tb_container_secret" )
@Data
public class ContainerSecretBean implements Serializable {

	private static final long serialVersionUID =  8445948360109847450L;


	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String uuid;

	/**
	 * 生成时间
	 */
   	@Column(name = "created_time" )
	private String createdTime;

	/**
	 * 更新时间
	 */
   	@Column(name = "updated_time" )
	private String updatedTime;

	/**
	 * 删除时间
	 */
   	@Column(name = "delete_time" )
	private String deleteTime;

	/**
	 * 是否已删除
	 */
   	@Column(name = "deleted" )
	private Boolean deleted;

	/**
	 * 密钥类型
	 */
   	@Column(name = "name" )
	private String name;


	/**
	 * 备注，对称密钥为空，非对称的标注是公钥还是私钥 跟{@link com.inspur.security.cbb3.kms.keymanager.secrets.po.SecretsBean}保持一致
	 * @see com.inspur.security.cbb3.kms.keymanager.secrets.po.SecretsBean#NOTE_PRIVATE_KEY
	 * @see com.inspur.security.cbb3.kms.keymanager.secrets.po.SecretsBean#NOTE_PUBLIC_KEY
	 */
	@Column(name = "note" )
	private String note;

	/**
	 * 密钥对应的容器id
	 */
   	@Column(name = "container_id" )
	private String containerId;

	/**
	 * 对应密钥表id
	 */
   	@Column(name = "secret_id" )
	private String secretId;

}
